home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1998 June
/
Macworld (1998-06).dmg
/
Shareware World
/
Info
/
For Developers
/
MacsBug 6.5.4a4
/
MacsBug 6.5.4a4 Read Me
< prev
next >
Wrap
Text File
|
1998-02-11
|
22KB
|
456 lines
About MacsBug 6.5.4a4
2/3/98
INSTALLATION INSTRUCTIONS
• MacsBug includes a number of folders. The contents of each is as follows:
"into System Folder" - This contains MacsBug itself. To install, place the "MacsBug" file
into your System folder and restart your machine.
"into MacsBug Preferences folder" - This contains optional dcmds. Currently, the only
optional dcmd is the Leaks dcmd. It is no longer included within MacsBug because it
patches a number of Memory Manager traps with 68K code, potentially slowing down
the system. To install, copy the Leaks file into your "MacsBug Preferences" folder which
is located in your "Preferences" folder.
"into Debugger Prefs file" - This contains the standard U.S. 'KCHR' keyboard translation
resource. It is needed when using MacsBug to debug on a system that is using a non-U.S.
keyboard layout (MacsBug requires U.S. keyboard translation). To install, copy the
'KCHR' resource from this file into your "Debugger Prefs" file which must be located in
the System folder.
"Building dcmds" - This contains sample C and Pascal source for a variety of dcmds, as
well as all headers and libraries necessary to build dcmds within the MPW environment.
• The set of dcmds that has been included with MacsBug in the optional file "PowerPC
dmcds" has been merged into MacsBug itself. When installing MacsBug, you should make
sure to remove this file from your "MacsBug Preferences" folder.
• When MacsBug is first entered, it displays a message if it has encountered dcmds that have
the same name. If you see this message, you should examine all of your preference files and
remove any duplicates. MacsBug does not guarantee which dcmd is executed when a name
collision occurs, so you may be accidentally using an old dcmd.
VIDEO DISPLAY CHANGES
• MacsBug's video display capabilities have been greatly enhanced, and it can now work in
any bit depth. By default, MacsBug still tries to switch into the lowest bit depth your
display device supports. However, a new option has been added to the 'mxpr' preference
resource, "Don't swap display bit depth", which tells MacsBug to never attempt depth
switches. This means that when MacsBug is active on the screen, it will remain in the
same bit depth Mac OS is presently in.
Normally MacsBug determines at startup what the minimum depth your display will
support, and allocates its video buffer for that depth. However, when you enable the
"Don't swap display bit depth" feature, MacsBug has to be prepared for any of the depths
your display supports, so it allocates a maximum-sized buffer. Note that enabling this
mode will likely significantly increase MacsBug's memory requirements. For example,
when your display supports millions of colors, MacsBug will allocate an offscreen
buffer that consumes 1,200K of RAM.
When the "Don't swap display bit depth" feature is enabled, MacsBug, for the first time,
properly supports display depth changes across invocations. When you leave MacsBug and
re-enter in a different depth, there may be a pause of a second or two while MacsBug re-
initializes its offscreen buffer.
• MacsBug now knows how to turn back on most power-managed display devices. If, for
example, the display MacsBug is using powers off while you're away, and your machine
eventually crashes (for whatever reason), MacsBug will attept to turn it back on when it
gets control.
TEXT COLORIZATION
• MacsBug now supports drawing text in certain hilight colors to attempt to draw your eye
to interesting display changes. The initial implementation shows registers that change as
you step in a hilighted color. By default this is 100% RGB red, but can be customized via
a 'clut' (Color lookup table) resource. The default 'clut' is located in MacsBug, and
should be copied to your "Debugger Prefs" file if you wish to modify it. The meaning of
each color entry is as follows:
0 - background color - Usually white. If a classic 'mxbc' (MacsBug color)
resource is present, this value is overridden from it.
1 - normal text foreground - Usually black. If a classic 'mxbc' (MacsBug color)
resource is present, this value is overridden from it.
2 - primary hilight color - Text is drawn in a noticeable color to draw attention
to it. This is used to color registers as they change while stepping.
3 - secondary hilight color - Text is drawn in a noticeable color to draw attention
to it, but to a lesser degree than the primary hilight color. This is not used in
MacsBug 6.5.4a4.
Colorization is enabled if the MacsBug display is in any depth greater than 1. If you
want to disable colorization, a new 'mxpr' preferences resource bit has been added. Set
the "Don't colorize text" bit to disable color.
STACK CRAWL
• Both the SC6 and SC7 stack crawls were unreliable on the most recent 8600 and 9600
machines (those with an inline cache controller, such as the 8600/250, 8600/300,
9600/300, and 9600/350). MacsBug is now more defensive when examining addresses on the
stack, and should no longer lock up those machines.
COMMAND LINE
• When you hit a function key and the command line is not empty, the key enters its name
with a trailing blank, rather than automatically hitting Return for you. This is useful
when defining a function-key macro. For example, to make the F12 function key do nothing:
MC DoF12 ''
(DoF12 was entered by simply hitting the F12 key.)
• Command-zero is now a parenthesis-matching demon. If you've typed out an expression,
hitting Command-0 inserts a close-paren at the current insertion location, and a matching
open-paren after the closest whitespace (or at the beginning of the command line).
• A new SET option, ECHO, has been added that enables or disables echoing of each command
you type into the history area. If ECHO is on, hitting return to execute the command
prints it into the history area like this:
>>> dm a0 iopb
• A change was made to MacsBug 6.5.3 that disallowed whitespace in binary subtraction
expressions such as "4 - 3" (this was made invalid). This was done to allow commands with
"-" options to properly parse their parameters. However, if you happened to type an
expression in this invalid form, the error was pretty poor (it used to say "The template
contains an unrecognized data type"). It now says something much more useful (using the
"4 - 3" example):
Expected a data type after the expression
Note: Command did not use all parameters ("- 3")
Note: To subtract, there must be no space before the '-'
DEBUGSTR
• DebugStr now supports an option where you can programmatically turn the DX state
(Debugger breaks) back to "on". Previously, once DX had been turned off, all commands
that are part of a DebugStr string (everything after the first ';') were ignored. If the
string passed to DebugStr is exactly ";DX ON" (ignoring case), user breaks will be re-
enabled starting with the next DebugStr.
DISASSEMBLY
• Both the PowerPC and 68K disassemblers no longer cause command line processing to
terminate if they are passed invalid addresses (odd, unmapped, etc.).
HEAP COMMANDS
• The HS (Heap Scrambling) command was broken in MacsBug 6.5.4a3c1 such that once you
enabled it, you could never disable it. This has been fixed.
• The HC (Heap Check) command has been fixed to stop ignoring three specific types of
heap corruption. These are:
- For non-relocatable blocks, if the heap header pointer doesn't point to the correct
heap.
- For relocatable blocks, if the address of the master pointer is not in the
correct heap.
- For relocatable blocks, if the master pointer does not point to the heap block.
These errors have been detected by the HZ (Heap Zones) and HD (Heap Dump) commands
when "!" was displayed beside a heap, or a "!" or "?" was displayed beside a heap block.
However, if you used HC on the heap in question, it would say everything was fine. This
has been fixed (and seems to have been broken for at least seven years).
• When the HZ and HC commands operate on the first embedded heap in the System heap
(called the ROZ - or ROM read-only zone), MacsBug no longer calls it corrupt for certain
valid oddities. In the future, if it does show up corrupt, it likely is damaged.
• The HP (Heap Profile) command has been enhanced a bit. It now shows the size of blocks in
K, and allows the "-i" (increment) and "-c" (minimum count) options to be used together.
LOGGING
• When the LOG command is asked to write to a pre-existing log file, it appends. However,
it used to change the type and creator to be an MPW text file. When appending, MacsBug
now leaves the type and creator alone.
MACROS
• Help on a macro now shows the full expansion when more than one layer of macro
expansion is required. A good example of this in action is the StdLog macro. Typing
"help StdLog" results in:
STDLOG is a macro which expands to:
StdLogInto StdLog
The full expansion is:
log "StdLog";set suspendprompt on;dv v;stat;wh;td;ip;hz;hc
all;ht;hx;ht;hx; file 0;rd -s;sc6;sc7 sp 1k;dm 0 20;log
Notice that StdLog is a macro which uses the StdLogInto macro which takes one parameter,
the name of the log file.
MEMORY COMMANDS
• When displaying a memory location via DB (Display Byte), DW (Display Word), or DL
(Display Long), MacsBug now does its normal "explain significance of", where it
shows you the magnitude or other interesting characteristics of the value displayed.
• Words and longs can now be written to odd locations with the SW (Set Word) and SL (Set
Long) commands. The restriction was only for the 68000, which we no longer support (the
68020 and later have no such restriction).
MISCELLANEOUS COMMANDS
• A number of commands which set an on or off state now support a third option, "now",
which tells you the current state of the command without changing it. The commands that
have this new option are ATR (A-Trap Record), DSCX (Discipline Breaks), SX (Symbol
Exchange), RAD (Register An display), DX (Debugger breaks), and SET (Set MacsBug option).
PREFERENCES
• Two new bits have been defined in the 'mxpr' (MacsBug preferences) "danger bits" field.
Setting the "Relax PowerPC embedded symbol limits" bit makes MacsBug's PowerPC symbol
lookup less strict by allowing the characters '(', ';', ')', '/', and '[' to appear in
symbols. This was added for MRJ. The second bit, "Don't use simplified PowerPC
mnemonics", defaults the PowerPC disassembly to not display mnemonics in simplified form.
You can change this at runtime with the SET SIMPLIFIED command.
RS/RB
• The RS (Unmount all volumes except servers and reboot) and the RB (Unmount just the
boot volume and reboot) commands have been unreliable when running certain
combinations of OS releases and extensions. MacsBug now goes to some length to avoid
calling anything but the ROM-based ShutDown Manager to restart the machine (thus
avoiding any patches that may have been applied to the ShutDown trap). If you had seen
"MacsBug caused the exception" after invoking RS or RB, this should now be fixed.
SYMBOL LOOKUP
• We now limit the extent of memory searched for embedded 68K and PowerPC symbols to
64K for performance reasons, rather than the entire size of each heap block being searched.
TEMPLATES
• A new template basic type has been added that interprets a 16-bit word as a volume
reference number. VRefNum attempts to find and display the volume name associated with
the specified number. For example, if you type:
-1 vRefNum
MacsBug responds with the name of the associated volume, such as:
FFFF = Starlust
• A new template basic type has been added that interprets three 16-bit words as an RGB
color. The RGBColor type uses the same amazing color-naming technology that's found in
Mac OS 8's Crayon color picker. For example, displaying the memory location 123456 as
an RGBColor yields:
DM 123456 RGBColor
Displaying RGBColor
00123456 FFFF 2222 0000 [Red Orange-ish]
TRANSITION VECTOR COMMANDS
• The TVC (Transition Vector Clear) command now supports clearing individual actions by
name. All actions with the given name will be cleared. It does not yet support the
library name syntax that the Transition Vector set action commands allow.
• We now support TVector commands on addresses as well as symbols.
WATCH POINTS
• It's clear that they are less than reliable; sometimes they work, and sometimes your
machine freezes hard. This version of MacsBug does not address this at all, so you should
be aware that they may not work. A future version will replace the underlying Watch Point
mechanism with a much more robust architecture.
MISCELANEOUS
• Updated the TD (Total register display) command for PowerPC to have better names for the
PowerPC 740/750 (Arthur) and 604ev (Mach-5) processors.
• Made a number of minor changes to better work on the Blue Box. This makes logging and
RS/RB work correctly. None of the changes are active on any other machines.
• The STAT command and SECONDS basic type now show the year as 4 digits instead of 2,
making MacsBug year 2000-savvy. This saves the Macintosh industry approximately $430
million (U.S.) per year, according to current U.S. Department of Labor statistics.
• MacsBug's hooks into the keyboard input mechanism are now installed the entire time
MacsBug is active, not just while it's reading the keyboard. This means that you should
no longer see keys "leaking" from MacsBug into the frontmost application.
• The 'ß' character (option-s) is now shorthand notation for kabillion in a hex number.
"FFCß" is equivalent to FFC00000, which is pronounced "eff-eff-see kabillion". For those
of you new to kabillion notation, it's a shorthand means to describe a 32-bit number that
has a lot of zeros in the least-significant digits (those on the right). MacsBug uses
kabillion notation when describing a 32-bit number that has at least 5 nibbles of zeros.
• Fixed a nasty synchronization problem between MacsBug’s A-Trap exception handler
and the code responsible for handling NMIs. If you had any A-Trap actions pending, and
you NMIed a number of times, it was likely that you would eventually crash within
MacsBug.
DCMD BUILDING AND SUPPORT
• The TestDcmd application that has been included with MacsBug as a framework to debug
dcmds has been removed. It has been superceded by MacsBugApp, the application version of
MacsBug.
• Cleaned up the dcmd formatting library interface (put.h) a bit. Removed the
unimplemented function PutInit. Updated the functions PutPStrTruncTo, PutPStrTo,
and PutPStr to require ConstStr255Params so as to be more correct. Changed a bunch of
parameters to be UInt16 or UInt32. Added a new function, PutMemoryLine, which
displays a line of memory formatted like MacsBug's built-in DM (Display Memory)
command.
DCMDS
• When the execution of a dcmd is aborted (by hitting a key while a dcmd is displaying
output), the area in the upper-left corner of the display (controlled by the SHOW
command) no longer partially erases.
• Cache
This is a new dcmd. Cache shows what files have disk blocks in the File Manager's disk
cache, where those blocks are in the file and on disk, and the state of those blocks
(clean/dirty, in use/not, contains valid data/not). Cache also shows free blocks that
aren't associated with an open file, but contain valid data, and shows some general cache
statistics (size, hits, misses, etc.). Developers of FSM-based file systems will find
this dcmd very useful.
• CFI
The functionality of the CFI (Code Fragment Info) dcmd has been merged into the Frags
dcmd (see the "-r" option), so CFI is no longer included in MacsBug.
• Drvr
Added a new option, "-b", which only displays information on drivers that are currently
busy.
• EBBE
The sleep queue procedure can now handle requests it doesn't understand. This makes
certain machines sleep when the EBBE dcmd is active.
Added a new option, "now", which tells you the current state of EBBE (on or off)
without changing it.
• File
Added a new option, "-p", which shows the files that have been opened by a given
application process.
• Frags
Added a new option, "-r", that displays files and fragments registered with the Code
Fragment Manager. These are registered with the CFM during system startup, but are not
necessarially currently being used.
• Gestalt
Added a few more selectors to the list of those that we won't call because they make
toolbox calls that don't work in the dcmd environment. Newly added are 'rdsk', 'irhw',
and 'tabl'. Added a description of the 'cpuf' (gestaltNativeCPUFamily) selector.
• Leaks
The Leaks dcmd is no longer included within MacsBug since it patches a number of Memory
Manager traps with 68K code, potentially slowing down the system. It is now provided as
an optional dcmd in its own file.
• PowerPC dcmds
The dcmds which were part of the optional file "PowerPC dcmds" have now been merged into
MacsBug so they will always be available. The newly-moved dcmds include:
atvb - break on toolbox calls by patching the trap table, not the 68K A-Trap
dispatcher (deprecated - use TVector commands instead)
cfm - display information on Code Fragments (deprecated - use Frags instead)
findsym - show all instances of a given CFM symbol, including each TVector
pp - parse, validate, and display a Mixed Mode proc info
r2db - break into the two-machine debugger
• QCheck
Added a new option, "now", which tells you the current state of QCheck (on or off)
without changing it.
• StopAS
This is a new dcmd. StopAS replaces the StopXPP dcmd, which only worked on AppleTalk
connections. StopAS attempts to close AppleShare sessions on both AppleTalk and TCP
connections. StopXPP is now a macro defined as StopAS.
• VMDump
The page hold and lock counts are now shown for ranges within file map space. Added a
"-b" option to show valid/invalid state of backing pages on disk. Added a count of
resident pages to the "-f" (file map) table. Added counts at the end of VMDump showing
number of InMemory pages, NotPaged pages, OnDisk pages, and contiguous OnDisk ranges
within the address range dumped.
TEMPLATES AND MACROS AND FRIENDS
• To support the new colorization mechanism, a 'clut' resource (ID 128) has been added to
MacsBug. If you want to modify this, copy it into your "Debugger Prefs" file. The ID must
be 128.
• The default 'mxbc' (MacsBug color) resource has been removed from MacsBug since the
'clut' now provides foreground and background color control.
• Updated the machine names list by adding the following:
PowerBook 2400
PowerBook G3
PowerMac G3
PowerMac 5500
PowerMac 6500
PowerMac 4400
• Changed the GrafPort and CGrafPort templates to no longer skip the spExtra field. We
don't have a Fixed data type, but we can at least show it as hex.
• Fixed the AppParameters template to no longer reference an undefined type, making it
work again. This makes the LaunchParamBlockRec template work as well, since it has a
pointer to an AppParameters template as its last field.
• Added a new enum, E2_FSID, and populated it with all of the existing external file
systems. Updated the VCB and DrvQEl templates to use this new enumeration.
• Added a new enum, E4_DirID, and populated it with the pre-defined directory IDs (root of
parent and parent). Changed the FSSpec template to use the new E4_DirID enumeration.
• Added a missing filler word in the IPCListPortParams template.
• Added two missing SoundDispatch calls: OpenMixerSoundComponent and
CloseMixerSoundComponent.
• Added missing Component Manager calls: OpenAComponent, OpenADefaultComponent,
and OpenAComponentResFile.
© 1998 Apple Computer, Inc. All rights reserved.
Apple, the Apple logo, Apple IIGS, AppleShare, AppleTalk, Macintosh, MPW, Power Macintosh, PowerBook,
QuickDraw, and QuickTime are trademarks of Apple Computer, Inc., registered in the United States and other countries.
Sound Manager is a trademark of Apple Computer, Inc. PowerPC is a trademark of International Business Machines
Corporation, used under license therefrom.